package com.jie.jie.Gesture;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;

import com.jaydenxiao.common.commonutils.ToastUitl;
import com.jie.jie.Gesture.widget.GestureContentView;
import com.jie.jie.Gesture.widget.GestureDrawline;
import com.jie.jie.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class GestureActivity extends AppCompatActivity {

    @Bind(R.id.fl)
    FrameLayout fl;
    private GestureContentView view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gesture);
        ButterKnife.bind(this);
        view = new GestureContentView(this, true, "1234", new GestureDrawline.GestureCallBack() {
           @Override
           public void onGestureCodeInput(String inputCode) {

           }

           @Override
           public void checkedSuccess() {
               view.clearDrawlineState(1000L);
               ToastUitl.showShort("1111111");
           }

           @Override
           public void checkedFail() {
               view.clearDrawlineState(1500);
               ToastUitl.showShort("222222");
           }
       });
        view.setParentView(fl);
    }
}
